package sdfi.lee.Entity.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the yiqishare table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="yiqishare"
 */

public abstract class BaseYiqishare  implements Serializable {

	public static String REF = "Yiqishare";
	public static String PROP_RELATION = "relation";
	public static String PROP_USERFOR = "userfor";
	public static String PROP_PHONE = "phone";
	public static String PROP_YIQITYPE = "yiqitype";
	public static String PROP_ID = "id";
	public static String PROP_FACTORY = "factory";
	public static String PROP_YIQINAME = "yiqiname";
	public static String PROP_UNIT = "unit";


	// constructors
	public BaseYiqishare () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseYiqishare (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String yiqitype;
	private java.lang.String yiqiname;
	private java.lang.String userfor;
	private java.lang.String factory;
	private java.lang.String unit;
	private java.lang.String relation;
	private java.lang.String phone;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="identity"
     *  column="Id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: yiqitype
	 */
	public java.lang.String getYiqitype () {
		return yiqitype;
	}

	/**
	 * Set the value related to the column: yiqitype
	 * @param yiqitype the yiqitype value
	 */
	public void setYiqitype (java.lang.String yiqitype) {
		this.yiqitype = yiqitype;
	}



	/**
	 * Return the value associated with the column: yiqiname
	 */
	public java.lang.String getYiqiname () {
		return yiqiname;
	}

	/**
	 * Set the value related to the column: yiqiname
	 * @param yiqiname the yiqiname value
	 */
	public void setYiqiname (java.lang.String yiqiname) {
		this.yiqiname = yiqiname;
	}



	/**
	 * Return the value associated with the column: userfor
	 */
	public java.lang.String getUserfor () {
		return userfor;
	}

	/**
	 * Set the value related to the column: userfor
	 * @param userfor the userfor value
	 */
	public void setUserfor (java.lang.String userfor) {
		this.userfor = userfor;
	}



	/**
	 * Return the value associated with the column: factory
	 */
	public java.lang.String getFactory () {
		return factory;
	}

	/**
	 * Set the value related to the column: factory
	 * @param factory the factory value
	 */
	public void setFactory (java.lang.String factory) {
		this.factory = factory;
	}



	/**
	 * Return the value associated with the column: unit
	 */
	public java.lang.String getUnit () {
		return unit;
	}

	/**
	 * Set the value related to the column: unit
	 * @param unit the unit value
	 */
	public void setUnit (java.lang.String unit) {
		this.unit = unit;
	}



	/**
	 * Return the value associated with the column: relation
	 */
	public java.lang.String getRelation () {
		return relation;
	}

	/**
	 * Set the value related to the column: relation
	 * @param relation the relation value
	 */
	public void setRelation (java.lang.String relation) {
		this.relation = relation;
	}



	/**
	 * Return the value associated with the column: phone
	 */
	public java.lang.String getPhone () {
		return phone;
	}

	/**
	 * Set the value related to the column: phone
	 * @param phone the phone value
	 */
	public void setPhone (java.lang.String phone) {
		this.phone = phone;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof sdfi.lee.Entity.Yiqishare)) return false;
		else {
			sdfi.lee.Entity.Yiqishare yiqishare = (sdfi.lee.Entity.Yiqishare) obj;
			if (null == this.getId() || null == yiqishare.getId()) return false;
			else return (this.getId().equals(yiqishare.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}